Prevent packaging a crate if any files are dirty
This commit alters Cargo's behavior to prevent publishing a crate by default if
any files in that crate are determined to be dirty, that is either modified or
not part of the working tree.
This can prevent common mistakes like many listed in #2063 and enables features like https://github.com/rust-lang/cargo/issues/841.
Closes https://github.com/rust-lang/cargo/issues/1597
Closes #2063